<?
set_time_limit(900);
ignore_user_abort(true);
error_reporting(E_NONE);

// Carrega classe para ler XMLs
include_once("../LIB/minixml/minixml.inc.php");
include_once("../admin/includes/classes/xml.class.php");
$OBXml = new Xml;

// Carrega classe para ler configuracoes
include_once("../admin/includes/classes/conf.class.php");
$OBConf = new Conf();
$OBConf->carrega_arquivo("../admin/includes/confs/main.conf.xml");

// Inicia Main
include_once(AW_FS_LIB."/adodb/adodb.inc.php");
include_once(AW_FS_INCLUDES."/classes/main.class.php");
include_once(AW_FS_INCLUDES."/classes/main.site.class.php");$OBSite = new Site();
include_once(AW_FS_INCLUDES."/classes/main.colaboracao.class.php");$OBColaboracao = new Colaboracao();
include_once(AW_FS_INCLUDES."/classes/main.dadocolaboracao.class.php");$OBDadoColaboracao = new DadoColaboracao();
include_once(AW_FS_INCLUDES."/classes/main.materia.class.php");$OBMateria = new Materia();


define("AW_DEBUG",true);

if(!isset($_REQUEST['site']))
{
	header("Location: ".$_SERVER['HTTP_REFERER']);
	exit();
}
define("AW_COD_SITE",intval($_REQUEST['site']));
$site = $OBSite->obtem("cod_site = '".AW_COD_SITE."'");
$site = $site[0];
$OBConf->carrega($site['xmldata_site']);
$site['xmldata_site'] = $OBXml->le($site['xmldata_site']);

if(!defined("AW_SITE_FS_FILE_EXTENSION"))
	define("AW_SITE_FS_FILE_EXTENSION","shtml");
?>